package com.itheima.itheima_health.mapper;

import com.itheima.itheima_health.pojo.Role;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.Set;

@Mapper
public interface RoleMapper {
    @Select("select r.* from t_role r,t_user_role ur where r.id = ur.role_id and ur.user_id = #{userId}")
    Set<Role> findByUserId(Integer userId);
}
